Symbolizes a thread. Base block to submit off-thread nkTasks::Task in this component.
More...
Symbolizes a thread. Base block to submit off-thread nkTasks::Task in this component.
◆ Thread()
nkTasks::Thread::Thread |
( |
| ) |
|
◆ ~Thread()
nkTasks::Thread::~Thread |
( |
| ) |
|
◆ getThreadId()
ThreadId nkTasks::Thread::getThreadId |
( |
| ) |
const |
- Returns
- The identifier associated to the thread.
◆ setParentScheduler()
void nkTasks::Thread::setParentScheduler |
( |
Scheduler * |
value | ) |
|
Allows to set the parent scheduler for a thread.
- Parameters
-
value | The scheduler marked as a parent. |
◆ addTask()
Allows to submit a task to the thread.
- Parameters
-
- Returns
- Information over the submitted task for later control if needed.
◆ cancelTask()
Request a task cancelling.
- Parameters
-
submittedWork | The information returned from a task submission, identifying the task to cancel. |
- Returns
- Whether the task could be cancelled (true) or not (false).
◆ askAbort()
void nkTasks::Thread::askAbort |
( |
| ) |
|
Requests the thread to end. This function won't halt the thread calling it. It merely marks the thread for end of execution.
◆ join()
void nkTasks::Thread::join |
( |
| ) |
|
Join the thread. First, a call to askAbort() has to be made. This will lock the thread calling this function until joinable thread is done.
◆ askAbortAndJoin()
void nkTasks::Thread::askAbortAndJoin |
( |
| ) |
|
◆ run()
void nkTasks::Thread::run |
( |
| ) |
|
Starts the thread. Has to be called for the thread to create its context and run.
The documentation for this class was generated from the following file:
- Documentation/Headers/NilkinsTasks/Threads/Thread.h